package com.gan.ganapiclient;

import com.gan.ganapiclient.client.GanApiClient;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author gan
 * @date 2023/5/5 13:16
 */
@Configuration
@ConfigurationProperties("ganapi-client")
@Data
@ComponentScan
public class GanApiClientConfig {
    private String accessKey;

    private String secretKey;

    @Bean
    public GanApiClient ganApiClient() {
        return new GanApiClient(accessKey, secretKey);
    }
}
